import {
	Http
} from '../common/http.js'

class Reserve extends Http {
	constructor() {
		super()
		this._storageKeyName = 'reserve'
	}
	
	getReserveDetail(id, callback){
		let params = {
			url: `/reserve/detail/${id}`,
			success (res) {
				callback && callback(res)
			}
		}
		this.request(params)
	}
	
	getReserveByPage(submitData, callback) {
		let params = {
			url: '/reserve/page',
			method: 'POST',
			data: submitData,
			success(res) {
				callback && callback(res)
			}
		}
		this.request(params)
	}
	
	submitDelivery(id, submitData, callback) {
		let params = {
			url: `/reserve/${id}/delivery`,
			method: 'POST',
			data: submitData,
			success(res){
				callback && callback(res)
			}
		}
		this.request(params)
	}
	
	getReserveDelivery(id, callback){
		let params = {
			url: `/reserve/${id}/delivery`,
			success(res){
				callback && callback(res)
			}
		}
		this.request(params)
	}
}
export {
	Reserve
}
